package com.michaelli.androidmoneyrecord.ui;

import com.michaelli.androidmoneyrecord.R;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

public class MainActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}
	
	public void goHistroy(View v){
		Toast.makeText(this, "goHistroy", Toast.LENGTH_SHORT).show();
	}
	
	public void goReport(View v){
		Toast.makeText(this, "goReport", Toast.LENGTH_SHORT).show();
	}
	
	public void goSetting(View v){
		Toast.makeText(this, "goSetting", Toast.LENGTH_SHORT).show();
	}
	
	public void goRecrod(View v){
		Toast.makeText(this, "goRecrod", Toast.LENGTH_SHORT).show();
	}
	
	@Override
	public void onBackPressed() {
		AlertDialog.Builder builder=new AlertDialog.Builder(this);
		builder.setTitle(R.string.exit_title)
		.setMessage(R.string.exit_msg)
		.setNegativeButton(android.R.string.cancel, null)
		.setPositiveButton(R.string.exit, new OnClickListener() {
			public void onClick(DialogInterface dialog, int which) {
				MainActivity.super.onBackPressed();
			}
		}).show();
	}
	
	
}
